///PHILOTES Source Code.  (C)2012 PhiloLabs
#pragma once

#ifndef __RotationalSpline_H__
#define __RotationalSpline_H__

#include "OgrePrerequisites.h"
#include "math/quaternion.h"

namespace Ogre {

	
	
	
	class _OgreExport RotationalSpline
    {
    public:
        RotationalSpline();
        ~RotationalSpline();

        
        void addPoint(const Quaternion& p);

        
        const Quaternion& getPoint(unsigned short index) const;

        
        unsigned short getNumPoints(void) const;

        
        void clear(void);

        
        void updatePoint(unsigned short index, const Quaternion& value);

        
        Quaternion interpolate(Real t, bool useShortestPath=true);

        
        Quaternion interpolate(unsigned int fromIndex, Real t, bool useShortestPath=true);

        
        void setAutoCalculate(bool autoCalc);

        
        void recalcTangents(void);

    protected:

        bool mAutoCalc;



        vector<Quaternion>::type mPoints;
        vector<Quaternion>::type mTangents;

    };

	
	

}


#endif

